<!doctype html>

<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>entry.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>

<div class="clear"></div>

<h2><a href="local_closure_goog_fs_entry.js.html">entry.js</a></h2>

<pre class="prettyprint lang-js">
<a name="line1"></a>// Copyright 2011 The Closure Library Authors. All Rights Reserved.
<a name="line2"></a>//
<a name="line3"></a>// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
<a name="line4"></a>// you may not use this file except in compliance with the License.
<a name="line5"></a>// You may obtain a copy of the License at
<a name="line6"></a>//
<a name="line7"></a>//      http://www.apache.org/licenses/LICENSE-2.0
<a name="line8"></a>//
<a name="line9"></a>// Unless required by applicable law or agreed to in writing, software
<a name="line10"></a>// distributed under the License is distributed on an &quot;AS-IS&quot; BASIS,
<a name="line11"></a>// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<a name="line12"></a>// See the License for the specific language governing permissions and
<a name="line13"></a>// limitations under the License.
<a name="line14"></a>
<a name="line15"></a>/**
<a name="line16"></a> * @fileoverview Wrappers for HTML5 Entry objects. These are all in the same
<a name="line17"></a> * file to avoid circular dependency issues.
<a name="line18"></a> *
<a name="line19"></a> * When adding or modifying functionality in this namespace, be sure to update
<a name="line20"></a> * the mock counterparts in goog.testing.fs.
<a name="line21"></a> *
<a name="line22"></a> */
<a name="line23"></a>goog.provide(&#39;goog.fs.DirectoryEntry&#39;);
<a name="line24"></a>goog.provide(&#39;goog.fs.DirectoryEntry.Behavior&#39;);
<a name="line25"></a>goog.provide(&#39;goog.fs.Entry&#39;);
<a name="line26"></a>goog.provide(&#39;goog.fs.FileEntry&#39;);
<a name="line27"></a>
<a name="line28"></a>
<a name="line29"></a>
<a name="line30"></a>/**
<a name="line31"></a> * The interface for entries in the filesystem.
<a name="line32"></a> * @interface
<a name="line33"></a> */
<a name="line34"></a>goog.fs.Entry = function() {};
<a name="line35"></a>
<a name="line36"></a>
<a name="line37"></a>/**
<a name="line38"></a> * @return {boolean} Whether or not this entry is a file.
<a name="line39"></a> */
<a name="line40"></a>goog.fs.Entry.prototype.isFile = function() {};
<a name="line41"></a>
<a name="line42"></a>
<a name="line43"></a>/**
<a name="line44"></a> * @return {boolean} Whether or not this entry is a directory.
<a name="line45"></a> */
<a name="line46"></a>goog.fs.Entry.prototype.isDirectory = function() {};
<a name="line47"></a>
<a name="line48"></a>
<a name="line49"></a>/**
<a name="line50"></a> * @return {string} The name of this entry.
<a name="line51"></a> */
<a name="line52"></a>goog.fs.Entry.prototype.getName = function() {};
<a name="line53"></a>
<a name="line54"></a>
<a name="line55"></a>/**
<a name="line56"></a> * @return {string} The full path to this entry.
<a name="line57"></a> */
<a name="line58"></a>goog.fs.Entry.prototype.getFullPath = function() {};
<a name="line59"></a>
<a name="line60"></a>
<a name="line61"></a>/**
<a name="line62"></a> * @return {!goog.fs.FileSystem} The filesystem backing this entry.
<a name="line63"></a> */
<a name="line64"></a>goog.fs.Entry.prototype.getFileSystem = function() {};
<a name="line65"></a>
<a name="line66"></a>
<a name="line67"></a>/**
<a name="line68"></a> * Retrieves the last modified date for this entry.
<a name="line69"></a> *
<a name="line70"></a> * @return {!goog.async.Deferred} The deferred Date for this entry. If an error
<a name="line71"></a> *     occurs, the errback is called with a {@link goog.fs.Error}.
<a name="line72"></a> */
<a name="line73"></a>goog.fs.Entry.prototype.getLastModified = function() {};
<a name="line74"></a>
<a name="line75"></a>
<a name="line76"></a>/**
<a name="line77"></a> * Retrieves the metadata for this entry.
<a name="line78"></a> *
<a name="line79"></a> * @return {!goog.async.Deferred} The deferred Metadata for this entry. If an
<a name="line80"></a> *     error occurs, the errback is called with a {@link goog.fs.Error}.
<a name="line81"></a> */
<a name="line82"></a>goog.fs.Entry.prototype.getMetadata = function() {};
<a name="line83"></a>
<a name="line84"></a>
<a name="line85"></a>/**
<a name="line86"></a> * Move this entry to a new location.
<a name="line87"></a> *
<a name="line88"></a> * @param {!goog.fs.DirectoryEntry} parent The new parent directory.
<a name="line89"></a> * @param {string=} opt_newName The new name of the entry. If omitted, the entry
<a name="line90"></a> *     retains its original name.
<a name="line91"></a> * @return {!goog.async.Deferred} The deferred {@link goog.fs.FileEntry} or
<a name="line92"></a> *     {@link goog.fs.DirectoryEntry} for the new entry. If an error occurs, the
<a name="line93"></a> *     errback is called with a {@link goog.fs.Error}.
<a name="line94"></a> */
<a name="line95"></a>goog.fs.Entry.prototype.moveTo = function(parent, opt_newName) {};
<a name="line96"></a>
<a name="line97"></a>
<a name="line98"></a>/**
<a name="line99"></a> * Copy this entry to a new location.
<a name="line100"></a> *
<a name="line101"></a> * @param {!goog.fs.DirectoryEntry} parent The new parent directory.
<a name="line102"></a> * @param {string=} opt_newName The name of the new entry. If omitted, the new
<a name="line103"></a> *     entry has the same name as the original.
<a name="line104"></a> * @return {!goog.async.Deferred} The deferred {@link goog.fs.FileEntry} or
<a name="line105"></a> *     {@link goog.fs.DirectoryEntry} for the new entry. If an error occurs, the
<a name="line106"></a> *     errback is called with a {@link goog.fs.Error}.
<a name="line107"></a> */
<a name="line108"></a>goog.fs.Entry.prototype.copyTo = function(parent, opt_newName) {};
<a name="line109"></a>
<a name="line110"></a>
<a name="line111"></a>/**
<a name="line112"></a> * Wrap an HTML5 entry object in an appropriate subclass instance.
<a name="line113"></a> *
<a name="line114"></a> * @param {!Entry} entry The underlying Entry object.
<a name="line115"></a> * @return {!goog.fs.Entry} The appropriate subclass wrapper.
<a name="line116"></a> * @protected
<a name="line117"></a> */
<a name="line118"></a>goog.fs.Entry.prototype.wrapEntry = function(entry) {};
<a name="line119"></a>
<a name="line120"></a>
<a name="line121"></a>/**
<a name="line122"></a> * Get the URL for this file.
<a name="line123"></a> *
<a name="line124"></a> * @param {string=} opt_mimeType The MIME type that will be served for the URL.
<a name="line125"></a> * @return {string} The URL.
<a name="line126"></a> */
<a name="line127"></a>goog.fs.Entry.prototype.toUrl = function(opt_mimeType) {};
<a name="line128"></a>
<a name="line129"></a>
<a name="line130"></a>/**
<a name="line131"></a> * Get the URI for this file.
<a name="line132"></a> *
<a name="line133"></a> * @deprecated Use {@link #toUrl} instead.
<a name="line134"></a> * @param {string=} opt_mimeType The MIME type that will be served for the URI.
<a name="line135"></a> * @return {string} The URI.
<a name="line136"></a> */
<a name="line137"></a>goog.fs.Entry.prototype.toUri = function(opt_mimeType) {};
<a name="line138"></a>
<a name="line139"></a>
<a name="line140"></a>/**
<a name="line141"></a> * Remove this entry.
<a name="line142"></a> *
<a name="line143"></a> * @return {!goog.async.Deferred} A deferred object. If the removal succeeds,
<a name="line144"></a> *     the callback is called with true. If an error occurs, the errback is
<a name="line145"></a> *     called a {@link goog.fs.Error}.
<a name="line146"></a> */
<a name="line147"></a>goog.fs.Entry.prototype.remove = function() {};
<a name="line148"></a>
<a name="line149"></a>
<a name="line150"></a>/**
<a name="line151"></a> * Gets the parent directory.
<a name="line152"></a> *
<a name="line153"></a> * @return {!goog.async.Deferred} The deferred {@link goog.fs.DirectoryEntry}.
<a name="line154"></a> *     If an error occurs, the errback is called with a {@link goog.fs.Error}.
<a name="line155"></a> */
<a name="line156"></a>goog.fs.Entry.prototype.getParent = function() {};
<a name="line157"></a>
<a name="line158"></a>
<a name="line159"></a>
<a name="line160"></a>/**
<a name="line161"></a> * A directory in a local FileSystem.
<a name="line162"></a> *
<a name="line163"></a> * @interface
<a name="line164"></a> * @extends {goog.fs.Entry}
<a name="line165"></a> */
<a name="line166"></a>goog.fs.DirectoryEntry = function() {};
<a name="line167"></a>
<a name="line168"></a>
<a name="line169"></a>/**
<a name="line170"></a> * Behaviors for getting files and directories.
<a name="line171"></a> * @enum {number}
<a name="line172"></a> */
<a name="line173"></a>goog.fs.DirectoryEntry.Behavior = {
<a name="line174"></a>  /**
<a name="line175"></a>   * Get the file if it exists, error out if it doesn&#39;t.
<a name="line176"></a>   */
<a name="line177"></a>  DEFAULT: 1,
<a name="line178"></a>  /**
<a name="line179"></a>   * Get the file if it exists, create it if it doesn&#39;t.
<a name="line180"></a>   */
<a name="line181"></a>  CREATE: 2,
<a name="line182"></a>  /**
<a name="line183"></a>   * Error out if the file exists, create it if it doesn&#39;t.
<a name="line184"></a>   */
<a name="line185"></a>  CREATE_EXCLUSIVE: 3
<a name="line186"></a>};
<a name="line187"></a>
<a name="line188"></a>
<a name="line189"></a>/**
<a name="line190"></a> * Get a file in the directory.
<a name="line191"></a> *
<a name="line192"></a> * @param {string} path The path to the file, relative to this directory.
<a name="line193"></a> * @param {goog.fs.DirectoryEntry.Behavior=} opt_behavior The behavior for
<a name="line194"></a> *     handling an existing file, or the lack thereof.
<a name="line195"></a> * @return {!goog.async.Deferred} The deferred {@link goog.fs.FileEntry}. If an
<a name="line196"></a> *     error occurs, the errback is called with a {@link goog.fs.Error}.
<a name="line197"></a> */
<a name="line198"></a>goog.fs.DirectoryEntry.prototype.getFile = function(path, opt_behavior) {};
<a name="line199"></a>
<a name="line200"></a>
<a name="line201"></a>/**
<a name="line202"></a> * Get a directory within this directory.
<a name="line203"></a> *
<a name="line204"></a> * @param {string} path The path to the directory, relative to this directory.
<a name="line205"></a> * @param {goog.fs.DirectoryEntry.Behavior=} opt_behavior The behavior for
<a name="line206"></a> *     handling an existing directory, or the lack thereof.
<a name="line207"></a> * @return {!goog.async.Deferred} The deferred {@link goog.fs.DirectoryEntry}.
<a name="line208"></a> *     If an error occurs, the errback is called a {@link goog.fs.Error}.
<a name="line209"></a> */
<a name="line210"></a>goog.fs.DirectoryEntry.prototype.getDirectory = function(path, opt_behavior) {};
<a name="line211"></a>
<a name="line212"></a>
<a name="line213"></a>/**
<a name="line214"></a> * Opens the directory for the specified path, creating the directory and any
<a name="line215"></a> * intermediate directories as necessary.
<a name="line216"></a> *
<a name="line217"></a> * @param {string} path The directory path to create. May be absolute or
<a name="line218"></a> *     relative to the current directory. The parent directory &quot;..&quot; and current
<a name="line219"></a> *     directory &quot;.&quot; are supported.
<a name="line220"></a> * @return {!goog.async.Deferred} A deferred {@link goog.fs.DirectoryEntry} for
<a name="line221"></a> *     the requested path. If an error occurs, the errback is called with a
<a name="line222"></a> *     {@link goog.fs.Error}.
<a name="line223"></a> */
<a name="line224"></a>goog.fs.DirectoryEntry.prototype.createPath = function(path) {};
<a name="line225"></a>
<a name="line226"></a>
<a name="line227"></a>/**
<a name="line228"></a> * Gets a list of all entries in this directory.
<a name="line229"></a> *
<a name="line230"></a> * @return {!goog.async.Deferred} The deferred list of {@link goog.fs.Entry}
<a name="line231"></a> *     results. If an error occurs, the errback is called with a
<a name="line232"></a> *     {@link goog.fs.Error}.
<a name="line233"></a> */
<a name="line234"></a>goog.fs.DirectoryEntry.prototype.listDirectory = function() {};
<a name="line235"></a>
<a name="line236"></a>
<a name="line237"></a>/**
<a name="line238"></a> * Removes this directory and all its contents.
<a name="line239"></a> *
<a name="line240"></a> * @return {!goog.async.Deferred} A deferred object. If the removal succeeds,
<a name="line241"></a> *     the callback is called with true. If an error occurs, the errback is
<a name="line242"></a> *     called a {@link goog.fs.Error}.
<a name="line243"></a> */
<a name="line244"></a>goog.fs.DirectoryEntry.prototype.removeRecursively = function() {};
<a name="line245"></a>
<a name="line246"></a>
<a name="line247"></a>
<a name="line248"></a>/**
<a name="line249"></a> * A file in a local filesystem.
<a name="line250"></a> *
<a name="line251"></a> * @interface
<a name="line252"></a> * @extends {goog.fs.Entry}
<a name="line253"></a> */
<a name="line254"></a>goog.fs.FileEntry = function() {};
<a name="line255"></a>
<a name="line256"></a>
<a name="line257"></a>/**
<a name="line258"></a> * Create a writer for writing to the file.
<a name="line259"></a> *
<a name="line260"></a> * @return {!goog.async.Deferred.&lt;!goog.fs.FileWriter&gt;} If an error occurs, the
<a name="line261"></a> *     errback is called with a {@link goog.fs.Error}.
<a name="line262"></a> */
<a name="line263"></a>goog.fs.FileEntry.prototype.createWriter = function() {};
<a name="line264"></a>
<a name="line265"></a>
<a name="line266"></a>/**
<a name="line267"></a> * Get the file contents as a File blob.
<a name="line268"></a> *
<a name="line269"></a> * @return {!goog.async.Deferred.&lt;!File&gt;} If an error occurs, the errback is
<a name="line270"></a> *     called with a {@link goog.fs.Error}.
<a name="line271"></a> */
<a name="line272"></a>goog.fs.FileEntry.prototype.file = function() {};
</pre>


</body>
</html>
